//
//  HomeViewController.m
//  WelNews
//
//  Created by lu larry on 12/22/12.
//  Copyright (c) 2012 Wel Teams. All rights reserved.
//

#import "HomeViewController.h"

@interface HomeViewController ()

@end

@implementation HomeViewController
@synthesize justPublishedVC;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void) viewWillAppear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:YES];
}
- (void) viewWillDisappear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)clicked:(id)sender
{
    UIButton *btn = (UIButton *) sender;
    switch (btn.tag) {
        // JustPublished
        case 0:
            if(self.justPublishedVC == nil)
            {
                self.justPublishedVC = [[JustPublishedViewController alloc] init];
            }
            [self.navigationController pushViewController:self.justPublishedVC animated:YES];
            break;
        // MedicalProgress
        case 1:
            
            break;
        case 2:
            
            break;
        // MedicalNews
        case 3:
            
            break;
        // ClinicalProgress
        case 4:
            
            break;
        // Settings
        case 5:
            
            break;
        default:
            break;
    }
}

@end
